home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvglue10.arc / TVWTITLE.C < prev    next >
C/C++ Source or Header  |  1988-08-13  |  1KB  |  39 lines

  1. /*=======================================================*/
  2. /*  TVWTITLE.C                                           */
  3. /*                                                       */
  4. /*  (c) Copyright 1988 Ralf Brown  All Rights Reserved   */
  5. /*  May be freely copied for noncommercial use, so long  */
  6. /*  as this copyright notice remains intact, and any     */
  7. /*  changes are marked in the comment blocks preceding   */
  8. /*  functions.                                           */
  9. /*=======================================================*/
  10.  
  11. #include <string.h>
  12. #include "tvapi.h"
  13. #include "tvstream.h"
  14.  
  15. /*=======================================================*/
  16. /* TVwin_title  change window's title                    */
  17. /*   Ralf Brown 4/3/88                                   */
  18. /*=======================================================*/
  19.  
  20. void pascal TVwin_title(OBJECT win,char *title)
  21. {
  22.    int size = strlen(title) ;
  23.    BYTE *stream = (BYTE *)malloc(size+7) ;
  24.  
  25.    if (stream)
  26.       {
  27.       stream[0] = 0x1B ;
  28.       stream[1] = 0x00 ;
  29.       *((int *)(stream+2)) = size + 2 ;
  30.       stream[4] = 0xEF ;
  31.       stream[5] = size ;
  32.       strncpy((char *)stream+6,title,size) ;
  33.       TVwin_stream(win,stream) ;
  34.       free(stream) ;
  35.       }
  36. }
  37.  
  38. /* End of TVWTITLE.C */
  39.